package com.itheima.homework;

import java.util.Scanner;
public class Test9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入月份: ");
        int m =sc.nextInt();
        System.out.println(m+"个月后兔子的对数: "+value(m));
    }

    public static int value(int m) {
        if (m <= 2) {
            return 1;
        } else {
            return m = value(m - 2) + value(m - 1);
        }
    }
}
